
<template>
    <ContentWrap>
        <h3>配电信息</h3>
        <table style="width: 100%;margin-top: 20px;" class="gridtable spanFont">
            <tr>
                <th style="width: 15%;">电表情况</th>
                    <td style="width: 30%;">
                        <el-radio-group v-model="localStructure.meterBoxSituation">
                            <el-radio value="1">一户一表</el-radio>
                            <el-radio value="2">集中电表</el-radio>
                        </el-radio-group>
                    </td>
                    <th style="width: 15%;">原电表位置</th>
                    <td style="width: 30%;">
                        <el-radio-group v-model="localStructure.originalMeterBoxPositionType">
                            <el-radio value="1">一楼外墙</el-radio>
                            <el-radio value="2">单元通道</el-radio>
                            <el-radio value="3">一楼室内</el-radio>
                            <el-radio value="4">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>   
                </tr>
                <tr>
                    <th>原电表参数</th>
                    <td>
                        <el-radio-group v-model="localStructure.originalMeterBoxParamType">
                            <el-radio value="1">单相220V</el-radio>
                            <el-radio value="2">三相380V</el-radio>
                        </el-radio-group>
                    </td>
                    <th>进户线</th>
                    <td>
                        <el-radio-group v-model="localStructure.incomingLineType">
                            <el-radio value="1">铜线</el-radio>
                            <el-radio value="2">铝线</el-radio>
                        </el-radio-group>
                        <span style="margin-left: 15px;width: 50px;">线径</span><el-input class="no-border-input underline-input"  v-model="localStructure.lineDiameter"/><span>mm²</span>
                        <span style="margin-left: 15px;">进户线长度</span><el-input class="no-border-input underline-input"  v-model="localStructure.linelength"/><span>m</span>
                    </td>
                </tr>
                <tr>
                    <th>台区变压器剩余可接入容量</th>
                    <td>
                        <el-input class="no-border-input underline-input" style="width: 10%;" v-model="localStructure.surplusPower"/><span>kVA</span>
                    </td>
                    <th>进户配电箱是否有空间安装智能电表(功率采集器)</th>
                    <td>
                        <el-radio-group v-model="localStructure.needIntelligentMeterBox">
                            <el-radio value="1">是</el-radio>
                            <el-radio value="0">否</el-radio>
                        </el-radio-group>
                    </td>
                </tr>    
                <tr>
                    <th>如无智能电表安装空间，客户是否接受配电系统改造</th>
                    <td>
                        <el-radio-group v-model="localStructure.needRenovation">
                            <el-radio value="1">是</el-radio>
                            <el-radio value="0">否</el-radio>
                        </el-radio-group>
                    </td>
                    <th></th>
                    <td></td>
                </tr>   
        </table>
        <h3 style="margin-top: 20px;" >斜屋面信息</h3>
        <table style="width: 100%;margin-top: 20px;" class="gridtable spanFont">
                <tr>
                    <th style="width: 15%;">屋面倾角</th>
                    <td style="width: 30%;">
                        <el-input class="no-border-input underline-input" style="width: 10%;" v-model="localStructure.roofInclinationAngle"/><span>°</span>
                    </td>
                    <th style="width: 15%;">瓦片类型</th>
                    <td style="width: 30%;">
                        <el-radio-group v-model="localStructure.tileType">
                            <el-radio value="1">陶瓷瓦</el-radio>
                            <el-radio value="2">陶瓷瓦</el-radio>
                            <el-radio value="3">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>   
                </tr>
                <tr>
                    <th>结构类型</th>
                    <td>
                        <el-radio-group v-model="localStructure.structureType">
                            <el-radio value="1">框架结构</el-radio>
                            <el-radio value="2">砖木结构</el-radio>
                            <el-radio value="3">砖混结构</el-radio>
                            <el-radio value="4">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                    <th>主梁类型</th>
                    <td>
                        <el-radio-group v-model="localStructure.mainPillarType">
                            <el-radio value="1">木梁</el-radio>
                            <el-radio value="2">水泥梁</el-radio>
                            <el-radio value="3">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                </tr>
                <tr>
                    <th>瓦片承重形式</th>
                    <td>
                        <el-radio-group v-model="localStructure.tileBearType">
                            <el-radio value="1">木望板</el-radio>
                            <el-radio value="2">木椽</el-radio>
                            <el-radio value="3">现浇板</el-radio>
                            <el-radio value="4">预制板</el-radio>
                            <el-radio value="5">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                    <th>檐沟及平台(功率采集器)</th>
                    <td>
                        <el-radio-group v-model="localStructure.platformType">
                            <el-radio value="1">有檐沟</el-radio>
                            <el-radio value="2">有平台</el-radio>
                            <el-radio value="3">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                </tr>    
                 
        </table>
        <h3 style="margin-top: 20px;" >平屋面信息</h3>
        <table style="width: 100%;margin-top: 20px;" class="gridtable spanFont">
                <tr>
                    <th style="width: 15%;">屋面防水层</th>
                    <td style="width: 30%;">
                        <el-radio-group v-model="localStructure.waterproofType">
                            <el-radio value="1">卷材防水</el-radio>
                            <el-radio value="2">刚性防水</el-radio>
                            <el-radio value="3">涂膜防水</el-radio>
                            <el-radio value="4">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                    <th style="width: 15%;">底座固定形式</th>
                    <td style="width: 30%;">
                        <el-radio-group v-model="localStructure.fixedBaseType">
                            <el-radio value="1">混凝土基墩</el-radio>
                            <el-radio value="2">混凝土基墩</el-radio>
                            <el-radio value="3">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>   
                </tr>
                <tr>
                    <th>屋面板类型</th>
                    <td>
                        <el-radio-group v-model="localStructure.roofPanelType">
                            <el-radio value="1" >现浇板</el-radio>
                            <el-radio value="2" >现浇板 
                                <span>（厚度:</span><el-input class="no-border-input underline-input" style="width: 30%;" v-model="localStructure.remark"/> 
                                <span>mm）</span>
                            </el-radio>
                            <el-radio value="3">其他<el-input class="no-border-input underline-input" style="width: 100%;" v-model="localStructure.remark"/></el-radio>
                        </el-radio-group>
                    </td>
                    <th></th>
                    <td></td>
                </tr> 
        </table>
    </ContentWrap>
    
</template>
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import * as ExplorationApi from '@/api/crm/exploration'


const props = defineProps<{
  structure: ExplorationApi.ExplorationStructureVO;
}>();
const { structure } = toRefs(props);
const localStructure = ref<ExplorationApi.ExplorationStructureVO>({ ...structure.value });
watch(
  structure,
  (newVal) => {
    localStructure.value = { ...newVal };
  },
  { deep: true } // 深度监听对象内部变化
);
// 5. 定义事件，向父组件传递修改后的数据
const emit = defineEmits<{
  (e: 'update:product', value: ExplorationApi.ExplorationStructureVO): void;
}>();

</script>
